cmake_minimum_required(VERSION 3.18)

set(CMAKE_CUDA_COMPILER /usr/local/cuda-12.2/bin/nvcc)
set(CUDACXX /usr/local/cuda-12.2/bin/nvcc)

project(cform LANGUAGES CXX CUDA)

# aux_source_directory(. SRC)

set(MAIN_SOUCE "main.cpp")
file(GLOB INCLUDE_SOURCE "*.h")
# file(GLOB CUDA_SOURCE "*.cu")
file(GLOB CXX_SOURCE "*.cpp")


add_executable(${PROJECT_NAME} ${MAIN_SOUCE} ${INCLUDE_SOURCE} ${CXX_SOURCE} ${UTIL_SOURCE})

include_directories(${PROJECT_NAME}
        PUBLIC include/
        ${CUDA_INCLUDE_DIR}
)

set_target_properties(${PROJECT_NAME} PROPERTIES
        CUDA_SEPARABLE_COMPILATION ON)

target_link_libraries(${PROJECT_NAME} PRIVATE cublas cuda)